from tkinter import *


def fun():
    from tkinter import messagebox
    messagebox.showinfo('Hello', 'Red Button clicked')


if __name__ == '__main__':
    parent = Tk()
    name = Label(parent, text="姓名").grid(row=0, column=0)
    e1 = Entry(parent).grid(row=0, column=1)
    password = Label(parent, text="密码").grid(row=1, column=0)
    e2 = Entry(parent).grid(row=1, column=1)
    submit = Button(parent, text="提交", command=fun).grid(row=4, column=0)
    parent.mainloop()
